/**
 * Copyright (C), 2001-2023, www.bosssof.com.cn
 * FileName: CommonConstants
 * Author: chen
 * Date: 2024-05-29 10:02
 * Description:
 * 定义通用的常量类，包括字符集、密码、远程调用协议、HTTP 请求类型、状态码和各种系统相关的常量。
 * <p>
 * History:
 * <author> chen
 * <time> 2024-05-29 10:02
 * <version> 1.0.0
 * <desc> 版本描述
 */
package com.bosssoft.g1.common.constant;

public class CommonConstants {

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * UTF-8 字符集 默认密码为Yykj1234，此密文为AES加密后的密文，仅用于设置订单管理员密码
     */
    public static final String PWD = "AECEC97AE5BC6AFE5AA7A108F28E771D";

    /**
     * 新增用户密码
     */
    public static final String PASSWORD = "Yykj1234";

    /**
     * RMI 远程方法调用
     */
    public static final String LOOKUP_RMI = "rmi://";

    /**
     * LDAP 远程方法调用
     */
    public static final String LOOKUP_LDAP = "ldap://";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * 成功标记
     */
    public static final Integer SUCCESS = 200;

    /**
     * 失败标记
     */
    public static final Integer FAIL = 500;

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 注册
     */
    public static final String REGISTER = "Register";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 当前记录起始索引
     */
    public static final String PAGE_NUM = "pageNum";

    /**
     * 每页显示记录数
     */
    public static final String PAGE_SIZE = "pageSize";

    /**
     * 排序列
     */
    public static final String ORDER_BY_COLUMN = "orderByColumn";

    /**
     * 排序的方向 "desc" 或者 "asc".
     */
    public static final String IS_ASC = "isAsc";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 验证码 redis key
     */
    public static final String REGISTER_CODE_KEY = "register_codes:";

    /**
     * 登录验证码 redis key
     */
    public static final String LOGIN_CODE_KEY = "register_codes:";

    /**
     * 注册验证码 发送次数 redis key
     */
    public static final String REGISTER_SEND_TIMES_KEY = "send_times:";

    /**
     * 登录验证码 发送次数 redis key
     */
    public static final String LOGIN_SEND_TIMES_KEY = "login_send_times:";

    /**
     * 手机该时间每8（小时）内发送注册验证码的次数
     */
    public static final long REGISTER_SEND_TIMES_EXPIRATION = 8;

    /**
     * 手机该时间每8（单位）内发送登录验证码的次数
     */
    public static final long LOGIN_SEND_TIMES_EXPIRATION = 8;

    /**
     * 注册验证码 该手机号获取注册验证码的次数上限
     */
    public static final long REGISTER_SEND_TIMES = 10;

    /**
     * 登录验证码 该手机号获取登录验证码的次数上限
     */
    public static final long LOGIN_SEND_TIMES = 10;

    /**
     * 注册验证码有效期（分钟）
     */
    public static final long REGISTER_EXPIRATION = 5;

    /**
     * 登录验证码有效期（分钟）
     */
    public static final long LOGIN_EXPIRATION = 10;

    /**
     * 验证码有效期（分钟）
     */
    public static final long CAPTCHA_EXPIRATION = 60;

    /**
     * 令牌有效期（分钟）
     */
    public final static long TOKEN_EXPIRE = 720;

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";
}

